home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 14846 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  924 b 

  1. Path: news.mira.net.au!news
  2. From: davidw@werple.net.au (David White)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Q: static private variables/functions
  5. Date: 2 Apr 1996 19:43:30 +1000
  6. Organization: Werple Internet, Melbourne
  7. Message-ID: <4jqss2$jc1@werple.net.au>
  8. References: <op3f6ntuoy.fsf@sweetbay.will.uiuc.edu>
  9. NNTP-Posting-Host: werplez.mira.net.au
  10.  
  11. Dragos-Anton Manolescu <manolesc@uiuc.edu> writes:
  12.  
  13.  
  14. >class Movie {
  15. >private:
  16. >  // Jpeg playback class variables
  17. >  static XtAppContext appContext;
  18. >  // Private functions
  19. >  static void PrivateXtLoop(void);
  20. >[stuff deleted]
  21. >};
  22.  
  23. >Everything compiles Ok but apparently the linker is not able to find
  24. >the class variables:
  25.  
  26. Did you define the private variable somewhere? The class only contains 
  27. its declaration. It needs a definition in a source file also, e.g.,
  28.  
  29.     XtAppContext Movie::appContext; // = some_initializer (if necessary)
  30.  
  31. David White
  32. davidw@werple.mira.net.au
  33.